﻿
Public Class Noticia
  Private _id As Integer
  Private _titulo As String
  Private _postador As Postador
  Private _corpo As String
  Private _nome_imagem As String
  Private _imagem() As Byte
  Private _dataPostagem As Date
  Private _ativo As Integer

  Sub New()
  End Sub

  Sub New(ByVal idNoticia As Integer)
    _id = idNoticia
  End Sub

  Public ReadOnly Property DataPostagemFormatada() As String
    Get
      Return _dataPostagem.ToString("dd/MM/yyyy")
    End Get
  End Property

  Public Property NomeImagem() As String
    Get
      Return _nome_imagem
    End Get
    Set(ByVal value As String)
      _nome_imagem = value
    End Set
  End Property

  Public Property Imagem() As Byte()
    Get
      Return _imagem
    End Get
    Set(ByVal value As Byte())
      _imagem = value
    End Set
  End Property

  Public Property DataPostagem() As Date
    Get
      Return _dataPostagem
    End Get
    Set(ByVal value As Date)
      _dataPostagem = value
    End Set
  End Property

  Public Property Ativo() As Integer
    Get
      Return _ativo
    End Get
    Set(ByVal value As Integer)
      _ativo = value
    End Set
  End Property

  Public Property Id() As Integer
    Get
      Return _id
    End Get
    Set(ByVal value As Integer)
      _id = value
    End Set
  End Property

  Public Property Titulo() As String
    Get
      Return _titulo
    End Get
    Set(ByVal value As String)
      _titulo = value
    End Set
  End Property

  Public Property Postador() As Postador
    Get
      Return _postador
    End Get
    Set(ByVal value As Postador)
      _postador = value
    End Set
  End Property

  Public Property Corpo() As String
    Get
      Return _corpo
    End Get
    Set(ByVal value As String)
      _corpo = value
    End Set
  End Property

End Class
